namespace xlink = "http://www.w3.org/1999/xlink"

start =
  [
    xlink:type = "simple"
    xlink:role = "http://www.w3.org/1999/xhtml"
    xlink:arcrole = "http://www.rddl.org/purposes#reference"
    xlink:href = "library.xhtml"
  ]
  element library { book-element+ }
author-element =
  element author {
    attribute id { text },
    name-element,
    born-element,
    dead-element?
  }
book-start =
  attribute id { text },
  isbn-element,
  title-element,
  author-element*
book-end =
  author-element*,
  character-element*,
  attribute available { text }
book-element = element book { book-start, book-end }
born-element = element born { text }
character-element =
  element character {
    attribute id { text },
    name-element,
    born-element,
    qualification-element
  }
dead-element = element dead { text }
isbn-element = element isbn { text }
name-element = element name { text }
qualification-element = element qualification { text }
title-element =
  element title {
    attribute xml:lang { text },
    text
  }
